package main.gui.workspace;

import character.GameCharacter;
import data.EditorObject;
import data.ObjectDatabase;

public class CharacterWorkspaceListItem extends WorkspaceListItem {

	public CharacterWorkspaceListItem(String characterGUID) {
		super(new String[] { "Options" }, characterGUID);
	}

	@Override
	public void buttonPressed(String buttonName) {
		if (buttonName.equals("Options")) {
			EditorObject o = ObjectDatabase.getInstance().getEditorObject(
					GameCharacter.class.getCanonicalName(), this.guid);
			Workspace.getInstance().openDataObjectEditor(
					o.buildDataObjectEditor());
		}
	}

	@Override
	public void drawThumbnail() {
		GameCharacter character = (GameCharacter) ObjectDatabase.getInstance()
				.getEditorObject(GameCharacter.class.getCanonicalName(),
						this.guid);
	}

}
